﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FlexiCache
{
    internal class ExternalOutputCacheProviderHost
    {
        private static ExternalOutputCacheProvider provider;
        private static object locker;

        static ExternalOutputCacheProviderHost()
        {
            locker = true;
        }

        public static ExternalOutputCacheProvider Provider
        {
            get
            {
                if (provider == null)
                    Initialize();
                return provider;
            }
        }

        internal ExternalOutputCacheProviderHost()
        {
        }

        private static void Initialize()
        {
            lock (locker)
            {
                if (provider == null)
                    provider = new ExternalOutputCacheProvider();
            }
        }
    }
}
